package com.atguigu.day11.sealed04;

//密封类 可以指定孩子都有谁
//如果是密封类的孩子 三个选择  final non-sealed sealed
public sealed class A permits B, C, D {

}

final class B extends A {
}

non-sealed class C extends A {
}

sealed class D extends A permits E {
}

final class E extends D {
}


class F extends C {

}